package com.lsj.gulimall.auth.utils;

import com.lsj.common.utils.R;

import java.util.Random;

/** 生成短信验证码工具
 * @author 梁胜君
 * @version 1.0
 * @create 2022/4/1 18:04
 */
public class CreateCodeNumUtil {

    public static String createCodeNum(){
        String str = "";
        Random random = new Random();
        for (int i = 0; i <=5; i++) {
            int num = random.nextInt(10);
            str += num;
        }
        return str;
    }

    public static void main(String[] args) {
        System.out.println(createCodeNum());
    }
}
